package com.good.jzhouse.dao;

import com.good.jzhouse.bean.Message;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @Author: xiaolei
 * @Date: 2021/3/16 10:04
 */
@Component
@Service()
public interface MessageDao {

    @Select("SELECT * FROM Message WHERE phone = #{phone}")
    public Message selectByPhone(String phone);


    @Delete("DELETE FROM Message WHERE phone = #{phone}")
    public  int dropInfoByNumber(String PhoneNumber);

    @Insert("INSERT INTO Message  VALUE(null,#{phone},#{code},#{sendTime})")
    public int insertMessage(Message m);
}
